package com.fly.shiroauth.handler;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

import javax.naming.AuthenticationException;

@ControllerAdvice
public class MyExceptionHandler {

    /*
        没有通过权限验证;
     */
    @ExceptionHandler
    public String errorHandler(AuthenticationException e){
        return "redirect:/my_error.html";
    }

}
